import { post } from '@/request/http'
import store from '@/store'

//区县 接口

// 列表数据接口
export const districtCountyList = ({
  ctyCode,
  ctyChnname,
  ctyCityCode,
  ctyPrvCode,
  PageIndexs,
  PageSizes
}) =>
  post(
    '/FTKJWLHYPT/base/tmCityModelList',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            ctyCode,
            ctyChnname,
            ctyCityCode,
            ctyPrvCode,
          },
        },
        Orderbys: {},
        PageIndex: {
          FTKJWLHYPT:PageIndexs
        },
        PageSize: {
          FTKJWLHYPT:PageSizes
        }

      }
    }
  )
//新增
export const addShippingCompany = (data) =>
  post(
    '/FTKJWLHYPT/base/addTmCityModel',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            ctyCode:data.ctyCode,
            ctyPrvCode:data.ctyPrvCode,
            ctyChnname:data.ctyChnname,
            ctyEgsname:data.ctyEgsname,
            ctyKillomete:data.ctyKillomete,
            ctyRemark:data.ctyRemark ,
            ctyCityCode:data.ctyCityCode,
            ctyIsvalid:data.ctyIsvalid,
            ctyPrename:data.ctyPrename,
            ctyInsertuser:store.state.user.USR_CODE_DX_H,
            
          }
        },
      }
    }
  )

//编辑
export const editShippingCompany = (data) =>
  post(
    '/FTKJWLHYPT/base/editTmCityModel',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            ctyPrvCode:data.ctyPrvCode,
            // ctyPrvCode:data.ctyPrvCode,
            ctyChnname:data.ctyChnname,
            ctyCode:data.ctyCode,
            ctyCityCode:data.ctyCityCode,
            ctyRemark:data.ctyRemark,
            ctyEgsname:data.ctyEgsname,
            ctyIsvalid:data.ctyIsvalid,
            ctyPrename:data.ctyPrename,
            ctyLstupduser:store.state.user.USR_CODE_DX_H
          }
        },
      }
    }
  )
//删除
export const delShippingCompany = (data) =>
  post(
    '/FTKJWLHYPT/base/deleteTmCityModel',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            ctyCode:data.ctyCode
          }
        },
      }
    }
  )
//   //省下拉框
// export const shengCityManagementXL = () =>
//   post(
//     '/FTKJWLHYPT/base/getPro',
//     {
//       Data: {
//         Parameters: {
//           FTKJWLHYPT: {

//           }
//         },
//       }
//     }
//   )
//市下拉框
// export const shiShippingCompany = (data) =>
//   post(
//     '/FTKJWLHYPT/base/getCtiye',
//     {
//       Data: {
//         Parameters: {
//           FTKJWLHYPT: {
//             ctyeCode:data.ctyeCode,
//             ctyeCityId:data.ctyeCityId
//           }
//         },
//       }
//     }
//   )
